package com.tulink.yichutu.controller.wxpay;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import java.util.List;
import com.tulink.yichutu.common.utils.DataResult;

import com.tulink.yichutu.entity.WxVipDateEntity;
import com.tulink.yichutu.service.WxVipDateService;



/**
 * 易出图会员时间
 *
 * @author wenbin
 * @email *****@mail.com
 * @date 2021-10-04 02:02:48
 */
@Controller
@RequestMapping("/")
public class WxVipDateController {
    @Autowired
    private WxVipDateService wxVipDateService;
    
    /**
    * 跳转到页面
    */
    @GetMapping("/index/wxVipDate")
    public String wxVipDate() {
        return "wxvipdate/list";
        }


    @ApiOperation(value = "查询分页数据")
    @PostMapping("wxVipDate/listByPage")
    @RequiresPermissions("wxVipDate:list")
    @ResponseBody
    public DataResult findListByPage(@RequestBody WxVipDateEntity wxVipDate){
        Page page = new Page(wxVipDate.getPage(), wxVipDate.getLimit());
        LambdaQueryWrapper<WxVipDateEntity> queryWrapper = Wrappers.lambdaQuery();
        //查询条件示例
        //queryWrapper.eq(WxVipDateEntity::getId, wxVipDate.getId());
        IPage<WxVipDateEntity> iPage = wxVipDateService.page(page, queryWrapper);
        return DataResult.success(iPage);
    }

}
